package name.fowler.refactoring.simplestore.services;

import javax.faces.bean.ApplicationScoped;
import java.util.List;

/**
 * Date: 01.10.13
 * Time: 10:26
 */

@ApplicationScoped
public class InListFormatter implements Formatter {
    @Override
    public String printList(List<String> list) {
        StringBuilder res = new StringBuilder("<ul>");
        for (String s : list) {
            res.append("<li>").append(s).append("</li>");
        }
        return res.append("</ul>").toString();
    }
}
